home *** CD-ROM | disk | FTP | other *** search
-
- Hi everybody!
-
- Thanks to the replies to my original posting.
- Some people missunderstood me: I am not writing
- a new extension or something, I'm just
- translating a time consuming routine into
- assembler code. As the AMOS routine contained
- a Plot command, I wanted to use the equivalent
- command from the Gfx library which needs the
- RastPort of the screen.
-
- Well, it may be true that AMOS does not use
- Intuition screens, but they have a RastPort.
- I know because I found out myself last night.
-
- Register a5 seems to be pointing permanently
- to an internal AMOS structure. The RastPort
- of the actual screen is in Leek(Areg(5)-6346)
- and the GfxBase is in Leek(Areg(5)-6318).
-
- I have tried it out with this simple
- assembler program (I hope it's correct because
- I haven't got it here right now):
-
- move.l (a3)+,d1 ; Get y coord
- move.l (a3)+,d0 ; Get x coord
- move.l -6346(a5),a1 ; Get RastPort
- move.l -6318(a5),a6 ; Get GfxBase
- jsr WritePixel(a6) ; Call WritePixel of graphics.library
- rts
-
- Once assembled this program can be loaded
- in a bank and called with
-
- Call 15,x,y
-
- It plots a point on the actual screen at (x,y).
-
- Note that:
- - The graphics.library seems to be permanently open in AMOS
- (No need to open it)
- - The parameters x and y are put on a "stack" to which a3
- points at when you use the Call command. (See AMOS manual)
- - This program corresponds more or less to the "F Plot"
- command of the Turbo extension. It's quite a lot faster
- than the original AMOS Plot command. (I'm not sure if
- it is faster when used this way, though, as the AMOS
- "Call" command may need a lot of overhead (saving
- the actual registers and other stuff?). I haven't looked
- at it.
-
-
- Greetings,
-
- Chris
-
-